{"ast":null,"code":"import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport classNames from 'classnames';\nimport { Field, FieldContext, ListContext } from 'rc-field-form';\nimport useState from \"rc-util/es/hooks/useState\";\nimport { supportRef } from \"rc-util/es/ref\";\nimport * as React from 'react';\nimport useFormItemStatus from '../hooks/useFormItemStatus';\nimport { ConfigContext } from '../../config-provider';\nimport { cloneElement, isValidElement } from '../../_util/reactNode';\nimport warning from '../../_util/warning';\nimport { FormContext, NoStyleItemContext } from '../context';\nimport useFrameState from '../hooks/useFrameState';\nimport useItemRef from '../hooks/useItemRef';\nimport { getFieldId, toArray } from '../util';\nimport ItemHolder from './ItemHolder';\nimport useStyle from '../style';\nconst NAME_SPLIT = '__SPLIT__';\nconst ValidateStatuses = ['success', 'warning', 'error', 'validating', ''];\nconst MemoInput = /*#__PURE__*/React.memo(_ref => {\n  let {\n    children\n  } = _ref;\n  return children;\n}, (prev, next) => prev.value === next.value && prev.update === next.update && prev.childProps.length === next.childProps.length && prev.childProps.every((value, index) => value === next.childProps[index]));\nfunction hasValidName(name) {\n  if (name === null) {\n    process.env.NODE_ENV !== \"production\" ? warning(false, 'Form.Item', '`null` is passed as `name` property') : void 0;\n  }\n  return !(name === undefined || name === null);\n}\nfunction genEmptyMeta() {\n  return {\n    errors: [],\n    warnings: [],\n    touched: false,\n    validating: false,\n    name: []\n  };\n}\nfunction InternalFormItem(props) {\n  const {\n    name,\n    noStyle,\n    className,\n    dependencies,\n    prefixCls: customizePrefixCls,\n    shouldUpdate,\n    rules,\n    children,\n    required,\n    label,\n    messageVariables,\n    trigger = 'onChange',\n    validateTrigger,\n    hidden\n  } = props;\n  const {\n    getPrefixCls\n  } = React.useContext(ConfigContext);\n  const {\n    name: formName\n  } = React.useContext(FormContext);\n  const isRenderProps = typeof children === 'function';\n  const notifyParentMetaChange = React.useContext(NoStyleItemContext);\n  const {\n    validateTrigger: contextValidateTrigger\n  } = React.useContext(FieldContext);\n  const mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : contextValidateTrigger;\n  const hasName = hasValidName(name);\n  const prefixCls = getPrefixCls('form', customizePrefixCls);\n  // Style\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  // ========================= MISC =========================\n  // Get `noStyle` required info\n  const listContext = React.useContext(ListContext);\n  const fieldKeyPathRef = React.useRef();\n  // ======================== Errors ========================\n  // >>>>> Collect sub field errors\n  const [subFieldErrors, setSubFieldErrors] = useFrameState({});\n  // >>>>> Current field errors\n  const [meta, setMeta] = useState(() => genEmptyMeta());\n  const onMetaChange = nextMeta => {\n    // This keyInfo is not correct when field is removed\n    // Since origin keyManager no longer keep the origin key anymore\n    // Which means we need cache origin one and reuse when removed\n    const keyInfo = listContext === null || listContext === void 0 ? void 0 : listContext.getKey(nextMeta.name);\n    // Destroy will reset all the meta\n    setMeta(nextMeta.destroy ? genEmptyMeta() : nextMeta, true);\n    // Bump to parent since noStyle\n    if (noStyle && notifyParentMetaChange) {\n      let namePath = nextMeta.name;\n      if (!nextMeta.destroy) {\n        if (keyInfo !== undefined) {\n          const [fieldKey, restPath] = keyInfo;\n          namePath = [fieldKey].concat(_toConsumableArray(restPath));\n          fieldKeyPathRef.current = namePath;\n        }\n      } else {\n        // Use origin cache data\n        namePath = fieldKeyPathRef.current || namePath;\n      }\n      notifyParentMetaChange(nextMeta, namePath);\n    }\n  };\n  // >>>>> Collect noStyle Field error to the top FormItem\n  const onSubItemMetaChange = (subMeta, uniqueKeys) => {\n    // Only `noStyle` sub item will trigger\n    setSubFieldErrors(prevSubFieldErrors => {\n      const clone = Object.assign({}, prevSubFieldErrors);\n      // name: ['user', 1] + key: [4] = ['user', 4]\n      const mergedNamePath = [].concat(_toConsumableArray(subMeta.name.slice(0, -1)), _toConsumableArray(uniqueKeys));\n      const mergedNameKey = mergedNamePath.join(NAME_SPLIT);\n      if (subMeta.destroy) {\n        // Remove\n        delete clone[mergedNameKey];\n      } else {\n        // Update\n        clone[mergedNameKey] = subMeta;\n      }\n      return clone;\n    });\n  };\n  // >>>>> Get merged errors\n  const [mergedErrors, mergedWarnings] = React.useMemo(() => {\n    const errorList = _toConsumableArray(meta.errors);\n    const warningList = _toConsumableArray(meta.warnings);\n    Object.values(subFieldErrors).forEach(subFieldError => {\n      errorList.push.apply(errorList, _toConsumableArray(subFieldError.errors || []));\n      warningList.push.apply(warningList, _toConsumableArray(subFieldError.warnings || []));\n    });\n    return [errorList, warningList];\n  }, [subFieldErrors, meta.errors, meta.warnings]);\n  // ===================== Children Ref =====================\n  const getItemRef = useItemRef();\n  // ======================== Render ========================\n  function renderLayout(baseChildren, fieldId, isRequired) {\n    if (noStyle && !hidden) {\n      return baseChildren;\n    }\n    return /*#__PURE__*/React.createElement(ItemHolder, Object.assign({\n      key: \"row\"\n    }, props, {\n      className: classNames(className, hashId),\n      prefixCls: prefixCls,\n      fieldId: fieldId,\n      isRequired: isRequired,\n      errors: mergedErrors,\n      warnings: mergedWarnings,\n      meta: meta,\n      onSubItemMetaChange: onSubItemMetaChange\n    }), baseChildren);\n  }\n  if (!hasName && !isRenderProps && !dependencies) {\n    return wrapSSR(renderLayout(children));\n  }\n  let variables = {};\n  if (typeof label === 'string') {\n    variables.label = label;\n  } else if (name) {\n    variables.label = String(name);\n  }\n  if (messageVariables) {\n    variables = Object.assign(Object.assign({}, variables), messageVariables);\n  }\n  // >>>>> With Field\n  return wrapSSR( /*#__PURE__*/React.createElement(Field, Object.assign({}, props, {\n    messageVariables: variables,\n    trigger: trigger,\n    validateTrigger: mergedValidateTrigger,\n    onMetaChange: onMetaChange\n  }), (control, renderMeta, context) => {\n    const mergedName = toArray(name).length && renderMeta ? renderMeta.name : [];\n    const fieldId = getFieldId(mergedName, formName);\n    const isRequired = required !== undefined ? required : !!(rules && rules.some(rule => {\n      if (rule && typeof rule === 'object' && rule.required && !rule.warningOnly) {\n        return true;\n      }\n      if (typeof rule === 'function') {\n        const ruleEntity = rule(context);\n        return ruleEntity && ruleEntity.required && !ruleEntity.warningOnly;\n      }\n      return false;\n    }));\n    // ======================= Children =======================\n    const mergedControl = Object.assign({}, control);\n    let childNode = null;\n    process.env.NODE_ENV !== \"production\" ? warning(!(shouldUpdate && dependencies), 'Form.Item', \"`shouldUpdate` and `dependencies` shouldn't be used together. See https://u.ant.design/form-deps.\") : void 0;\n    if (Array.isArray(children) && hasName) {\n      process.env.NODE_ENV !== \"production\" ? warning(false, 'Form.Item', 'A `Form.Item` with a `name` prop must have a single child element. For information on how to render more complex form items, see https://u.ant.design/complex-form-item.') : void 0;\n      childNode = children;\n    } else if (isRenderProps && (!(shouldUpdate || dependencies) || hasName)) {\n      process.env.NODE_ENV !== \"production\" ? warning(!!(shouldUpdate || dependencies), 'Form.Item', 'A `Form.Item` with a render function must have either `shouldUpdate` or `dependencies`.') : void 0;\n      process.env.NODE_ENV !== \"production\" ? warning(!hasName, 'Form.Item', 'A `Form.Item` with a render function cannot be a field, and thus cannot have a `name` prop.') : void 0;\n    } else if (dependencies && !isRenderProps && !hasName) {\n      process.env.NODE_ENV !== \"production\" ? warning(false, 'Form.Item', 'Must set `name` or use a render function when `dependencies` is set.') : void 0;\n    } else if (isValidElement(children)) {\n      process.env.NODE_ENV !== \"production\" ? warning(children.props.defaultValue === undefined, 'Form.Item', '`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.') : void 0;\n      const childProps = Object.assign(Object.assign({}, children.props), mergedControl);\n      if (!childProps.id) {\n        childProps.id = fieldId;\n      }\n      if (props.help || mergedErrors.length > 0 || mergedWarnings.length > 0 || props.extra) {\n        const describedbyArr = [];\n        if (props.help || mergedErrors.length > 0) {\n          describedbyArr.push(`${fieldId}_help`);\n        }\n        if (props.extra) {\n          describedbyArr.push(`${fieldId}_extra`);\n        }\n        childProps['aria-describedby'] = describedbyArr.join(' ');\n      }\n      if (mergedErrors.length > 0) {\n        childProps['aria-invalid'] = 'true';\n      }\n      if (isRequired) {\n        childProps['aria-required'] = 'true';\n      }\n      if (supportRef(children)) {\n        childProps.ref = getItemRef(mergedName, children);\n      }\n      // We should keep user origin event handler\n      const triggers = new Set([].concat(_toConsumableArray(toArray(trigger)), _toConsumableArray(toArray(mergedValidateTrigger))));\n      triggers.forEach(eventName => {\n        childProps[eventName] = function () {\n          var _a2, _c2;\n          var _a, _b, _c;\n          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n            args[_key] = arguments[_key];\n          }\n          (_a = mergedControl[eventName]) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [mergedControl].concat(args));\n          (_c = (_b = children.props)[eventName]) === null || _c === void 0 ? void 0 : (_c2 = _c).call.apply(_c2, [_b].concat(args));\n        };\n      });\n      // List of props that need to be watched for changes -> if changes are detected in MemoInput -> rerender\n      const watchingChildProps = [childProps['aria-required'], childProps['aria-invalid'], childProps['aria-describedby']];\n      childNode = /*#__PURE__*/React.createElement(MemoInput, {\n        value: mergedControl[props.valuePropName || 'value'],\n        update: children,\n        childProps: watchingChildProps\n      }, cloneElement(children, childProps));\n    } else if (isRenderProps && (shouldUpdate || dependencies) && !hasName) {\n      childNode = children(context);\n    } else {\n      process.env.NODE_ENV !== \"production\" ? warning(!mergedName.length, 'Form.Item', '`name` is only used for validate React element. If you are using Form.Item as layout display, please remove `name` instead.') : void 0;\n      childNode = children;\n    }\n    return renderLayout(childNode, fieldId, isRequired);\n  }));\n}\nconst FormItem = InternalFormItem;\nFormItem.useStatus = useFormItemStatus;\nexport default FormItem;","map":{"version":3,"names":["_toConsumableArray","classNames","Field","FieldContext","ListContext","useState","supportRef","React","useFormItemStatus","ConfigContext","cloneElement","isValidElement","warning","FormContext","NoStyleItemContext","useFrameState","useItemRef","getFieldId","toArray","ItemHolder","useStyle","NAME_SPLIT","ValidateStatuses","MemoInput","memo","_ref","children","prev","next","value","update","childProps","length","every","index","hasValidName","name","process","env","NODE_ENV","undefined","genEmptyMeta","errors","warnings","touched","validating","InternalFormItem","props","noStyle","className","dependencies","prefixCls","customizePrefixCls","shouldUpdate","rules","required","label","messageVariables","trigger","validateTrigger","hidden","getPrefixCls","useContext","formName","isRenderProps","notifyParentMetaChange","contextValidateTrigger","mergedValidateTrigger","hasName","wrapSSR","hashId","listContext","fieldKeyPathRef","useRef","subFieldErrors","setSubFieldErrors","meta","setMeta","onMetaChange","nextMeta","keyInfo","getKey","destroy","namePath","fieldKey","restPath","concat","current","onSubItemMetaChange","subMeta","uniqueKeys","prevSubFieldErrors","clone","Object","assign","mergedNamePath","slice","mergedNameKey","join","mergedErrors","mergedWarnings","useMemo","errorList","warningList","values","forEach","subFieldError","push","apply","getItemRef","renderLayout","baseChildren","fieldId","isRequired","createElement","key","variables","String","control","renderMeta","context","mergedName","some","rule","warningOnly","ruleEntity","mergedControl","childNode","Array","isArray","defaultValue","id","help","extra","describedbyArr","ref","triggers","Set","eventName","_a2","_c2","_a","_b","_c","_len","arguments","args","_key","call","watchingChildProps","valuePropName","FormItem","useStatus"],"sources":["/data/messenger.client/node_modules/antd/es/form/FormItem/index.js"],"sourcesContent":["import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport classNames from 'classnames';\nimport { Field, FieldContext, ListContext } from 'rc-field-form';\nimport useState from \"rc-util/es/hooks/useState\";\nimport { supportRef } from \"rc-util/es/ref\";\nimport * as React from 'react';\nimport useFormItemStatus from '../hooks/useFormItemStatus';\nimport { ConfigContext } from '../../config-provider';\nimport { cloneElement, isValidElement } from '../../_util/reactNode';\nimport warning from '../../_util/warning';\nimport { FormContext, NoStyleItemContext } from '../context';\nimport useFrameState from '../hooks/useFrameState';\nimport useItemRef from '../hooks/useItemRef';\nimport { getFieldId, toArray } from '../util';\nimport ItemHolder from './ItemHolder';\nimport useStyle from '../style';\nconst NAME_SPLIT = '__SPLIT__';\nconst ValidateStatuses = ['success', 'warning', 'error', 'validating', ''];\nconst MemoInput = /*#__PURE__*/React.memo(_ref => {\n  let {\n    children\n  } = _ref;\n  return children;\n}, (prev, next) => prev.value === next.value && prev.update === next.update && prev.childProps.length === next.childProps.length && prev.childProps.every((value, index) => value === next.childProps[index]));\nfunction hasValidName(name) {\n  if (name === null) {\n    process.env.NODE_ENV !== \"production\" ? warning(false, 'Form.Item', '`null` is passed as `name` property') : void 0;\n  }\n  return !(name === undefined || name === null);\n}\nfunction genEmptyMeta() {\n  return {\n    errors: [],\n    warnings: [],\n    touched: false,\n    validating: false,\n    name: []\n  };\n}\nfunction InternalFormItem(props) {\n  const {\n    name,\n    noStyle,\n    className,\n    dependencies,\n    prefixCls: customizePrefixCls,\n    shouldUpdate,\n    rules,\n    children,\n    required,\n    label,\n    messageVariables,\n    trigger = 'onChange',\n    validateTrigger,\n    hidden\n  } = props;\n  const {\n    getPrefixCls\n  } = React.useContext(ConfigContext);\n  const {\n    name: formName\n  } = React.useContext(FormContext);\n  const isRenderProps = typeof children === 'function';\n  const notifyParentMetaChange = React.useContext(NoStyleItemContext);\n  const {\n    validateTrigger: contextValidateTrigger\n  } = React.useContext(FieldContext);\n  const mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : contextValidateTrigger;\n  const hasName = hasValidName(name);\n  const prefixCls = getPrefixCls('form', customizePrefixCls);\n  // Style\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  // ========================= MISC =========================\n  // Get `noStyle` required info\n  const listContext = React.useContext(ListContext);\n  const fieldKeyPathRef = React.useRef();\n  // ======================== Errors ========================\n  // >>>>> Collect sub field errors\n  const [subFieldErrors, setSubFieldErrors] = useFrameState({});\n  // >>>>> Current field errors\n  const [meta, setMeta] = useState(() => genEmptyMeta());\n  const onMetaChange = nextMeta => {\n    // This keyInfo is not correct when field is removed\n    // Since origin keyManager no longer keep the origin key anymore\n    // Which means we need cache origin one and reuse when removed\n    const keyInfo = listContext === null || listContext === void 0 ? void 0 : listContext.getKey(nextMeta.name);\n    // Destroy will reset all the meta\n    setMeta(nextMeta.destroy ? genEmptyMeta() : nextMeta, true);\n    // Bump to parent since noStyle\n    if (noStyle && notifyParentMetaChange) {\n      let namePath = nextMeta.name;\n      if (!nextMeta.destroy) {\n        if (keyInfo !== undefined) {\n          const [fieldKey, restPath] = keyInfo;\n          namePath = [fieldKey].concat(_toConsumableArray(restPath));\n          fieldKeyPathRef.current = namePath;\n        }\n      } else {\n        // Use origin cache data\n        namePath = fieldKeyPathRef.current || namePath;\n      }\n      notifyParentMetaChange(nextMeta, namePath);\n    }\n  };\n  // >>>>> Collect noStyle Field error to the top FormItem\n  const onSubItemMetaChange = (subMeta, uniqueKeys) => {\n    // Only `noStyle` sub item will trigger\n    setSubFieldErrors(prevSubFieldErrors => {\n      const clone = Object.assign({}, prevSubFieldErrors);\n      // name: ['user', 1] + key: [4] = ['user', 4]\n      const mergedNamePath = [].concat(_toConsumableArray(subMeta.name.slice(0, -1)), _toConsumableArray(uniqueKeys));\n      const mergedNameKey = mergedNamePath.join(NAME_SPLIT);\n      if (subMeta.destroy) {\n        // Remove\n        delete clone[mergedNameKey];\n      } else {\n        // Update\n        clone[mergedNameKey] = subMeta;\n      }\n      return clone;\n    });\n  };\n  // >>>>> Get merged errors\n  const [mergedErrors, mergedWarnings] = React.useMemo(() => {\n    const errorList = _toConsumableArray(meta.errors);\n    const warningList = _toConsumableArray(meta.warnings);\n    Object.values(subFieldErrors).forEach(subFieldError => {\n      errorList.push.apply(errorList, _toConsumableArray(subFieldError.errors || []));\n      warningList.push.apply(warningList, _toConsumableArray(subFieldError.warnings || []));\n    });\n    return [errorList, warningList];\n  }, [subFieldErrors, meta.errors, meta.warnings]);\n  // ===================== Children Ref =====================\n  const getItemRef = useItemRef();\n  // ======================== Render ========================\n  function renderLayout(baseChildren, fieldId, isRequired) {\n    if (noStyle && !hidden) {\n      return baseChildren;\n    }\n    return /*#__PURE__*/React.createElement(ItemHolder, Object.assign({\n      key: \"row\"\n    }, props, {\n      className: classNames(className, hashId),\n      prefixCls: prefixCls,\n      fieldId: fieldId,\n      isRequired: isRequired,\n      errors: mergedErrors,\n      warnings: mergedWarnings,\n      meta: meta,\n      onSubItemMetaChange: onSubItemMetaChange\n    }), baseChildren);\n  }\n  if (!hasName && !isRenderProps && !dependencies) {\n    return wrapSSR(renderLayout(children));\n  }\n  let variables = {};\n  if (typeof label === 'string') {\n    variables.label = label;\n  } else if (name) {\n    variables.label = String(name);\n  }\n  if (messageVariables) {\n    variables = Object.assign(Object.assign({}, variables), messageVariables);\n  }\n  // >>>>> With Field\n  return wrapSSR( /*#__PURE__*/React.createElement(Field, Object.assign({}, props, {\n    messageVariables: variables,\n    trigger: trigger,\n    validateTrigger: mergedValidateTrigger,\n    onMetaChange: onMetaChange\n  }), (control, renderMeta, context) => {\n    const mergedName = toArray(name).length && renderMeta ? renderMeta.name : [];\n    const fieldId = getFieldId(mergedName, formName);\n    const isRequired = required !== undefined ? required : !!(rules && rules.some(rule => {\n      if (rule && typeof rule === 'object' && rule.required && !rule.warningOnly) {\n        return true;\n      }\n      if (typeof rule === 'function') {\n        const ruleEntity = rule(context);\n        return ruleEntity && ruleEntity.required && !ruleEntity.warningOnly;\n      }\n      return false;\n    }));\n    // ======================= Children =======================\n    const mergedControl = Object.assign({}, control);\n    let childNode = null;\n    process.env.NODE_ENV !== \"production\" ? warning(!(shouldUpdate && dependencies), 'Form.Item', \"`shouldUpdate` and `dependencies` shouldn't be used together. See https://u.ant.design/form-deps.\") : void 0;\n    if (Array.isArray(children) && hasName) {\n      process.env.NODE_ENV !== \"production\" ? warning(false, 'Form.Item', 'A `Form.Item` with a `name` prop must have a single child element. For information on how to render more complex form items, see https://u.ant.design/complex-form-item.') : void 0;\n      childNode = children;\n    } else if (isRenderProps && (!(shouldUpdate || dependencies) || hasName)) {\n      process.env.NODE_ENV !== \"production\" ? warning(!!(shouldUpdate || dependencies), 'Form.Item', 'A `Form.Item` with a render function must have either `shouldUpdate` or `dependencies`.') : void 0;\n      process.env.NODE_ENV !== \"production\" ? warning(!hasName, 'Form.Item', 'A `Form.Item` with a render function cannot be a field, and thus cannot have a `name` prop.') : void 0;\n    } else if (dependencies && !isRenderProps && !hasName) {\n      process.env.NODE_ENV !== \"production\" ? warning(false, 'Form.Item', 'Must set `name` or use a render function when `dependencies` is set.') : void 0;\n    } else if (isValidElement(children)) {\n      process.env.NODE_ENV !== \"production\" ? warning(children.props.defaultValue === undefined, 'Form.Item', '`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.') : void 0;\n      const childProps = Object.assign(Object.assign({}, children.props), mergedControl);\n      if (!childProps.id) {\n        childProps.id = fieldId;\n      }\n      if (props.help || mergedErrors.length > 0 || mergedWarnings.length > 0 || props.extra) {\n        const describedbyArr = [];\n        if (props.help || mergedErrors.length > 0) {\n          describedbyArr.push(`${fieldId}_help`);\n        }\n        if (props.extra) {\n          describedbyArr.push(`${fieldId}_extra`);\n        }\n        childProps['aria-describedby'] = describedbyArr.join(' ');\n      }\n      if (mergedErrors.length > 0) {\n        childProps['aria-invalid'] = 'true';\n      }\n      if (isRequired) {\n        childProps['aria-required'] = 'true';\n      }\n      if (supportRef(children)) {\n        childProps.ref = getItemRef(mergedName, children);\n      }\n      // We should keep user origin event handler\n      const triggers = new Set([].concat(_toConsumableArray(toArray(trigger)), _toConsumableArray(toArray(mergedValidateTrigger))));\n      triggers.forEach(eventName => {\n        childProps[eventName] = function () {\n          var _a2, _c2;\n          var _a, _b, _c;\n          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n            args[_key] = arguments[_key];\n          }\n          (_a = mergedControl[eventName]) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [mergedControl].concat(args));\n          (_c = (_b = children.props)[eventName]) === null || _c === void 0 ? void 0 : (_c2 = _c).call.apply(_c2, [_b].concat(args));\n        };\n      });\n      // List of props that need to be watched for changes -> if changes are detected in MemoInput -> rerender\n      const watchingChildProps = [childProps['aria-required'], childProps['aria-invalid'], childProps['aria-describedby']];\n      childNode = /*#__PURE__*/React.createElement(MemoInput, {\n        value: mergedControl[props.valuePropName || 'value'],\n        update: children,\n        childProps: watchingChildProps\n      }, cloneElement(children, childProps));\n    } else if (isRenderProps && (shouldUpdate || dependencies) && !hasName) {\n      childNode = children(context);\n    } else {\n      process.env.NODE_ENV !== \"production\" ? warning(!mergedName.length, 'Form.Item', '`name` is only used for validate React element. If you are using Form.Item as layout display, please remove `name` instead.') : void 0;\n      childNode = children;\n    }\n    return renderLayout(childNode, fieldId, isRequired);\n  }));\n}\nconst FormItem = InternalFormItem;\nFormItem.useStatus = useFormItemStatus;\nexport default FormItem;"],"mappings":"AAAA,OAAOA,kBAAkB,MAAM,8CAA8C;AAC7E,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,KAAK,EAAEC,YAAY,EAAEC,WAAW,QAAQ,eAAe;AAChE,OAAOC,QAAQ,MAAM,2BAA2B;AAChD,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,iBAAiB,MAAM,4BAA4B;AAC1D,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,YAAY,EAAEC,cAAc,QAAQ,uBAAuB;AACpE,OAAOC,OAAO,MAAM,qBAAqB;AACzC,SAASC,WAAW,EAAEC,kBAAkB,QAAQ,YAAY;AAC5D,OAAOC,aAAa,MAAM,wBAAwB;AAClD,OAAOC,UAAU,MAAM,qBAAqB;AAC5C,SAASC,UAAU,EAAEC,OAAO,QAAQ,SAAS;AAC7C,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,QAAQ,MAAM,UAAU;AAC/B,MAAMC,UAAU,GAAG,WAAW;AAC9B,MAAMC,gBAAgB,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,CAAC;AAC1E,MAAMC,SAAS,GAAG,aAAahB,KAAK,CAACiB,IAAI,CAACC,IAAI,IAAI;EAChD,IAAI;IACFC;EACF,CAAC,GAAGD,IAAI;EACR,OAAOC,QAAQ;AACjB,CAAC,EAAE,CAACC,IAAI,EAAEC,IAAI,KAAKD,IAAI,CAACE,KAAK,KAAKD,IAAI,CAACC,K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